<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta charset="utf-8" />
		<meta content="IE=edge" http-equiv="X-UA-Compatible">
		<link href="__ROOT__/Public/admin/css/admin.css" rel="stylesheet" />
		<link href="__ROOT__/Public/js/tbox/box.css" rel="stylesheet" />
		<script src="__ROOT__/Public/js/jquery.min.js"></script>
		<script src="__ROOT__/Public/js/common.js"></script>
		<script src="__ROOT__/Public/js/tbox/box.js"></script>
		<script src="__ROOT__/Public/js/left.js"></script>
		<script src="__PUBLIC__/js/jquery.zxxbox.v3/js/jquery.zxxbox.3.0.js"></script>
		<script type="text/javascript" src="__PUBLIC__/admin/js/User/usergroup.js"></script>
		<link href="__PUBLIC__/admin/style.css" rel="stylesheet" />
		<script type="text/javascript">
			function deleteAd(ids) {
				var length = 0;
				
				if(ids) {
					length = 1;
				}else {
					ids    = getChecked();
					length = ids[0] == 0 ? ids.length - 1 : ids.length;
			        ids    = ids.toString();
				}
				if(ids=='') {
					alert('<?php echo (L("pleaseSelectAData")); ?>');
					return ;
				}
				if(confirm('<?php echo (L("remove")); ?>'+length+'<?php echo (L("records")); ?>?')) {
					$.post("<?php echo URL('admin/User/delField');?>",{ids:ids},function(res){
						if(res=='1') {
							alert('<?php echo (L("delSuccess")); ?>');
							removeItem(ids);
						}else {
							alert('<?php echo (L("delFails")); ?>');
						}
					});
				}
			}
			
			function move(ad_id, direction) {
				var baseid  = direction == 'up' ? $('#'+ad_id).prev().attr('id') : $('#'+ad_id).next().attr('id');
				if(baseid) {
					$.post("<?php echo URL('cms/BlockClassify/display_order');?>", {id:ad_id, baseid:baseid}, function(res){
						if(res == '1') {
							//交换位置
							direction == 'up' ? $('#'+ad_id).insertBefore('#'+baseid) : $("#"+ad_id).insertAfter('#'+baseid);
						}
					});
				}
			}
			
			function move2(ad_id, direction) {
				var baseid  = direction == 'up' ? $('#c_'+ad_id).prev().attr('cid') : $('#c_'+ad_id).next().attr('cid');
				if(baseid) {
					$.post("<?php echo URL('cms/Article/display_order');?>", {id:ad_id, baseid:baseid}, function(res){
						if(res == '1') {
							//交换位置
							direction == 'up' ? $('#c_'+ad_id).insertBefore('#c_'+baseid) : $("#c_"+ad_id).insertAfter('#c_'+baseid);
						}
					});
				}
			}
			
			function selectMult() {
				$("select").children().each(function() {
					$(this).attr('selected','selected');
				});
			}
			
			function prompt(msg,other){
				$.zxxbox.remind("<img src='__PUBLIC__/admin/images/loading.gif' />" + msg,function() {},{btnclose:false,title:'操作提示'},other);
			}
		</script>
	</head>
	<body>
		<html>
	<head>
		<style type="text/css">
			body {font-size:13px;background: #669999;}
			li {list-style:none;}
			a {text-decoration:blink;color: black;}
			a:hover {text-decoration: underline;}
			.daohangdiv {margin-left:80px;width:800px;}
			.daohang li {border:1px solid #d4d4d4;float:left;width:124px;height:30px;text-align: center;font-size: 13px;}
			.content {border: 1px solid #d4d4d4;float:left;margin-left:80px;width:755px;background: #99cccc;}
			.cmp {float:right;text-align: left;margin-left: 20px;}
			.styleside {margin-top:0px;margin-left:1050px;width:auto;height:auto;overflow:hidden;position:absolute; }
			.styleText {height:auto;border:#d4d4d4 1px solid;margin-bottom:8px;text-align:left;background: #99cccc;}
		</style>
	</head>
	<body>
		<div class="daohangdiv">
			<ul class="daohang">
				<li><a href="<?php echo SITE_URL.'/cms/index.html'; ?>">首页</a></li>
				<?php $__LIST__=M()->query('SELECT cname,url,imageurl,concat("http://ylsns.com",substring(createurl,2),replace(catenaming, "{id}", id)) as channelurl FROM
					yl_cms_category WHERE plistid="0"');if(is_array($__LIST__)):$i =0;foreach($__LIST__ as $key=>$channels): $mod = ($i % 2);++$i;?><li>
					<a href='<?php echo !empty($channels["url"])?$channels["url"]:$channels["channelurl"];?>' ><?php echo $channels["cname"];?></a>
				</li><?php endforeach; endif;?>
			</ul>
		</div>
<div style="width: 990px; float: left;">
	<a href='http://ylsns.com/cms/index.html'>首页</a>
	<br />
	<?php $__LIST__ = M()->query('SELECT concat("http://ylsns.com",substring(category.createurl,2),replace(artnaming, "{id}", article.id)) as picurl,
		concat("http://ylsns.com",substring(category.createurl,2),replace(catenaming, "{id}", article.cid)) as channelurl,
		article.id as id,article.url as url,article.updatetime as updatetime,article.readpoint as readpoint,article.imageurl as
		imageurl,article.title as title,category.cname as cname FROM yl_cms_article article
		LEFT JOIN yl_cms_category category ON article.cid=category.id where category.cname="测试栏目5" limit 0,10');if(is_array($__LIST__)): $i = 0;foreach($__LIST__ as $key=>$field): $mod = ($i % 2 );++$i;?><div class="content">
			<div style="float: left;">
				<div class="cmp">
					<ul>
						<li><a href='<?php echo !empty($field["url"])?$field["url"]:$field["picurl"];?>' ><?php echo $field["title"];?></a></li>
					</ul>
				</div>
			</div>
		</div><?php endforeach; endif;?>
	<div class="content">
		<div class="pages">
				共12条数据
				首页
				上一页
				&nbsp;<span class='current'>1</span>&nbsp;<a href='http://ylsns.com/index.php?app=cms&amp;m=Create&amp;a=create_catepage&p=2'>&nbsp;2&nbsp;</a>
				<a href='http://ylsns.com/index.php?app=cms&amp;m=Create&amp;a=create_catepage&p=2'>下一页</a>
				<a href='http://ylsns.com/index.php?app=cms&amp;m=Create&amp;a=create_catepage&p=2' >尾页</a>
				跳转到:<select onChange='javascript:window.location.href=(this.options[this.selectedIndex].value);'><a>1</a><option value='http://ylsns.com/index.php?app=cms&amp;m=Create&amp;a=create_catepage&p=1' selected='selected'>1</option><a href='http://ylsns.com/index.php?app=cms&amp;m=Create&amp;a=create_catepage&p=2'>2</a><option value='http://ylsns.com/index.php?app=cms&amp;m=Create&amp;a=create_catepage&p=2'>2</option></select>
			</div>
	</div>
</div>
<div class="styleside">
			<div class="styleText">
				<b>热门文章</b><br/><p>
				<?php $__LIST__ = M()->query('SELECT concat("http://ylsns.com",substring(category.createurl,2),replace(artnaming, "{id}", article.id)) as picurl,
		concat("http://ylsns.com",substring(category.createurl,2),replace(catenaming, "{id}", article.cid)) as channelurl,
		article.id as id,article.url as url,article.updatetime as updatetime,article.readpoint as readpoint,article.imageurl as
		imageurl,article.title as title,category.cname as cname FROM yl_cms_article article
		LEFT JOIN yl_cms_category category ON article.cid=category.id order by article.updatetime desc,article.readpoint desc limit 0,10');if(is_array($__LIST__)): $i = 0;foreach($__LIST__ as $key=>$field): $mod = ($i % 2 );++$i;?><a href='<?php echo !empty($field["url"])?$field["url"]:$field["picurl"];?>' ><?php echo $field["title"];?></a><br/><?php endforeach; endif;?>
			</div>
			<div class="styleText">
				<b>推荐文章</b><br/><p>
				<?php $__LIST__ = M()->query('SELECT concat("http://ylsns.com",substring(category.createurl,2),replace(artnaming, "{id}", article.id)) as picurl,
		concat("http://ylsns.com",substring(category.createurl,2),replace(catenaming, "{id}", article.cid)) as channelurl,
		article.id as id,article.url as url,article.updatetime as updatetime,article.readpoint as readpoint,article.imageurl as
		imageurl,article.title as title,category.cname as cname FROM yl_cms_article article
		LEFT JOIN yl_cms_category category ON article.cid=category.id order by article.updatetime desc limit 0,10');if(is_array($__LIST__)): $i = 0;foreach($__LIST__ as $key=>$field): $mod = ($i % 2 );++$i;?><a href='<?php echo !empty($field["url"])?$field["url"]:$field["picurl"];?>' ><?php echo $field["title"];?></a><br/><?php endforeach; endif;?>
			</div>
		</div>
	</body>
</html>
	</body>
</html>